home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 6 / MacMania 6.toast / / Tools&Utilities / TouchMe 1.2□ / touchMe 1.2 Folder / touchMe source codes / CW11 PP source / source / Common Lib / UMacOSTools.h < prev    next >
Encoding:
Text File  |  1997-04-25  |  1.3 KB  |  55 lines  |  [TEXT/CWIE]

  1. // ==================================================
  2. //    UMacOSTools.h
  3. //    Copyright (C) 1997 Mizutori Tetsuya
  4. //    March 24, 1997, April 9, 1997.
  5. // ==================================================
  6. //    All documents are pretty-printed in 10-point Geneva font.
  7.  
  8. #pragma once
  9.  
  10. #include <Finder.h>
  11.  
  12. class UMacOSTools {
  13.  
  14. public:
  15.                 UMacOSTools();
  16.                 ~UMacOSTools();
  17.  
  18.     // Check keyboard status wheather cmd-period is pressed.
  19.     static Boolean    IsCommandPeriod( void );
  20.  
  21.     // Check keyboard status wheather a modifier key is pressed.
  22.     static Boolean    IsModifierKeyPressed(
  23.                     Uint32            inModifierKey );
  24.  
  25.     static Boolean    IsModifierKeyPressed(
  26.                     const EventRecord &    inMacOSEvent,
  27.                     Uint32            inModifierKey );
  28.  
  29.     // Convert a four character code to a Pascal string and return a pointer to the string.
  30.     static StringPtr    FourCharCodeToPStr(
  31.                     FourCharCode        inCode,
  32.                     StringPtr            outString );
  33.  
  34.     // Convert an Pascal string to a four character code.
  35.     static void        PStrToFourCharCode(
  36.                     ConstStringPtr        inString,
  37.                     FourCharCode &        outCode );
  38.  
  39.     // Set a Finder flag.
  40.     static void        SetFinderFlag(
  41.                     FSSpec &            ioMacFSSpec,
  42.                     Uint16            inFinderFlag,
  43.                     Boolean            inSetting );
  44.  
  45.     // Return whether a Finder flag is on or off.
  46.     static Boolean    HasFinderFlag(
  47.                     FSSpec &            inMacFSSpec,
  48.                     Uint16            inFinderFlag );
  49.  
  50. protected:
  51.  
  52. };
  53.  
  54. // end of definitions
  55.